package com.family.model;

import com.alibaba.fastjson.JSON;

import java.io.Serializable;

/**
 * 用户
 */
public class User implements Serializable {
    private int id;


    private String realName;
    private String wechatId;
    private int gender;
    private Generation generation;
    private Name name;

    public User clone() {
        User user = new User();
        user.setId(getId());
        user.setRealName(getRealName());
        user.setGender(getGender());
        user.setGeneration(getGeneration());
        user.setName(getName());
        return user;
    }

    /**
     * 添加者
     */
    private User addUser;

    public User getAddUser() {
        return addUser;
    }

    public void setAddUser(User addUser) {
        this.addUser = addUser;
    }

    public int getGender() {
        return gender;
    }

    public void setGender(int gender) {
        this.gender = gender;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getWechatId() {
        return wechatId;
    }

    public void setWechatId(String wechatId) {
        this.wechatId = wechatId;
    }

    public Generation getGeneration() {
        return generation;
    }

    public void setGeneration(Generation generation) {
        this.generation = generation;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public Name getName() {
        return name;
    }

    public void setName(Name name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
